﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CodeGenerator.Core
{
    public class TemplateFiles
    {
        public string FileName { get; set; }
        private string _extension;
        public string Extension
        {
            get { return _extension; }
            set
            {
                _extension = value;
                if (_extension == ".cs")
                {
                    FileType = Core.FileType.cs;
                }
                else if (_extension == ".sql")
                {
                    FileType = Core.FileType.sql;
                }
                else if (_extension == ".txt")
                {
                    FileType = Core.FileType.txt;
                }
                else if (_extension == ".java")
                {
                    FileType = Core.FileType.java;
                }
                else if (_extension == ".jsp")
                {
                    FileType = Core.FileType.jsp;
                }
                else if (_extension == ".html")
                {
                    FileType = Core.FileType.html;
                }
                else if (_extension == ".cshtml")
                {
                    FileType = Core.FileType.cshtml;
                }
                else
                {
                    FileType = Core.FileType.empty;
                };
            }
        }
        public string FullName { get; set; }
        public FileType FileType { get; set; }
    }
}
